home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / stringex / ex6.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  319 b   |  18 lines

  1. Program Example6;
  2.  
  3. Uses strings;
  4.  
  5. { Program to demonstrate the StrECopy function. }
  6.  
  7. Const P : PChar = 'This is a PCHAR string.';
  8.  
  9. Var PP : PChar;
  10.  
  11. begin
  12.   PP:=StrAlloc (StrLen(P)+1);
  13.   If Longint(StrECopy(PP,P))-Longint(PP)<>StrLen(P) then
  14.     Writeln('Something is wrong here !')
  15.   else
  16.     Writeln ('PP= ',PP);
  17. end.
  18.